package com.inspectortime.domain.impl;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.inspectortime.common.PersistentEntityBase;
import com.inspectortime.domain.type.AuditEntryType;
import com.inspectortime.timestamp.Timestamped;

@Entity
@Table(name = "AUDIT_ENTRY")
public class AuditEntryImpl extends PersistentEntityBase implements Timestamped {
	
	private Date createdTime;
	private Date lastModifiedTime;
	private AuditEntryType type;
	private String actorUserId;
	private String ipAddress;
	private String targetObjectClass;
	private String targetObjectId;
	
	@Column( length = 32 )
	public String getActorUserId() {
		return actorUserId;
	}
	public void setActorUserId(String actorUserId) {
		this.actorUserId = actorUserId;
	}
	
	@Column( length = 255 )
	public String getTargetObjectClass() {
		return targetObjectClass;
	}
	public void setTargetObjectClass(String targetObjectClass) {
		this.targetObjectClass = targetObjectClass;
	}
	
	@Column( length = 32 )
	public String getTargetObjectId() {
		return targetObjectId;
	}
	public void setTargetObjectId(String targetObjectId) {
		this.targetObjectId = targetObjectId;
	}
	
	@Column( length = 20 )
	public String getIpAddress() {
		return ipAddress;
	}
	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}
	
	public AuditEntryType getType() {
		return type;
	}
	public void setType(AuditEntryType type) {
		this.type = type;
	}
	
	@Column( length = 255 )
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	private String text;
	
	public Date getCreatedTime() {
		return createdTime;
	}
	public Date getLastModifiedTime() {
		return lastModifiedTime;
	}
	public void setCreatedTime(Date created) {
		this.createdTime = created;		
	}
	public void setLastModifiedTime(Date modified) {
		this.lastModifiedTime = modified;
	}

}
